package course.dao;

import course.pojo.entity.Subject;
import course.pojo.vo.Page;

import java.sql.Connection;
import java.util.List;

/**
 * @author HLF
 * @date 2022/6/30 20:43
 */
public interface SubjectDao {
    Subject getById(Integer suid, Connection connection);

    /**
     * @return 返回自增主键
     */
    int addSubject(Subject subject, Connection connection);

    int updateById(Subject subject, Connection connection);

    int deleteById(Integer suid, Connection connection);

    List<Subject> getList(Connection connection);

    /**/

    int deleteSelect(List<Integer> ids, Connection connection);

    long count(Connection connection);

    Page<Subject> page(Integer pageNo, Connection connection);


    Page<Subject> page2(Integer pageNo, Integer cid, Connection connection);

    Page<Subject> ownPage(Integer pageNo, Integer tid, Connection connection);

    Page<Subject> ownPage2(Integer pageNo, Integer sid, Connection connection);

    Page<Subject> query(String suname, Integer pageNo, Connection connection);

    Subject getBySuname(String suname, Connection connection);

    List<Subject> selectBathByIds(List<Integer> ids, Connection connection);

}
